package com.hibase.core.excel.vo.config;

import com.hibase.core.excel.vo.BaseViewExcelVO;
import com.hibase.core.web.annotation.HibaseValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;

/**
 * Excel模板配置管理
 *
 * @author <a href="mailto:xiongliyi@hichain.com">Ian Xiong</a>
 * @since 1.4.35-V2
 */

@Data
@HibaseValid
public class MdsExcelImportConfigInsertVO extends BaseViewExcelVO {

    @ApiModelProperty(value = "模板配置编码", required = true)
    @NotEmpty(message = "模板配置编码不能为空")
    private String code;

    @ApiModelProperty(value = "模板名称", required = true)
    @NotEmpty(message = "模板名称不能为空")
    private String name;

    @ApiModelProperty(value = "业务数据集ID", required = true)
    @NotEmpty(message = "业务数据集ID不能为空")
    private String bizDataId;

    @ApiModelProperty(value = "业务处理服务名称", required = true)
    @NotEmpty(message = "业务处理服务名称不能为空")
    private String beanName;

    @ApiModelProperty(value = "业务服务方法", required = true)
    @NotEmpty(message = "业务服务方法不能为空")
    private String methodName;

    @ApiModelProperty("起始读取行")
    @Range(min = 1, max = Integer.MAX_VALUE, message = "起始读取行设置错误")
    private Integer headRowNum;

    @ApiModelProperty("是否跳过空行")
    private Boolean beIgnoreEmptyRow;

    @ApiModelProperty("是否默认模板")
    private Boolean beDefault;

    @ApiModelProperty(value = "监听器类型(类的全路径)", notes = "读取的监听器类，需要继承ReadAnalysisProcessor类")
    private String readListener;

    @ApiModelProperty("导入模板文件(目前存储fileToken)")
    private String templatePath;

    @ApiModelProperty("数据库的表名称[预留]")
    private String tbName;

}
